"""
-*- coding:utf-8 -*-
__project__ = 'gitee'
__file_name__ = 'testkone'
__author__ = '86138'
__time__ = '2020-10-28 01:14'
__product_name = PyCharm
# code is far away from bugs with the god animal protecting
    I love animals. They taste delicious.
              ┏┓      ┏┓
            ┏┛┻━━━┛┻┓
            ┃        ┃
            ┃  ┳┛  ┗┳  ┃
            ┃      ┻      ┃
            ┗━┓      ┏━┛
                ┃      ┗━━━┓
                ┃  神兽保佑    ┣┓
                ┃　永无BUG！   ┏┛
                ┗┓┓┏━┳┓┏┛
                  ┃┫┫  ┃┫┫
                  ┗┻┛  ┗┻┛
"""

import random

# b = 'c'
# print(type(eval(b)))
# num1 = 1
# num2 = 1.14
# num3 = num1 + num2
# print(num3)
# #查看类型
# print(type(num3))
# print('我\n今年%d岁' % num1, end = '')
#
# import keyword
# print(keyword.kwlist)
# print('hello')
# print('word')
# a = input('你今年几岁\n')
# print(type(a))
# print(a)
# num4, num5 = 4, 5
# print(num4)
# print(num5)


# 1、	说出变量名可以由哪些字符组成
#
# 2、	写出变量命名时的规则
#
# 3、	写出什么是驼峰法
#
# 4、编写程序，完成以下要求：
# •	提示用户进行输入数据
# •	获取用户的数据（需要获取2个）
# •	对获取的两个数字进行求和运行，并输出相应的结果
# 5、编写程序，完成以下信息的显示:
# •	==================================
# •	=        欢迎进入到身份认证系统V1.0
# •	= 1. 登录
# •	= 2. 退出
# •	= 3. 认证
# •	= 4. 修改密码
# •	==================================
# 6、编写程序，通过input()获取一个人的信息，然后按照下面格式显示
# ==================================
# 姓名: xxxxx
# QQ:xxxxxxx
# 手机号:131xxxxxx
# 公司地址:北京市xxxx
# ==================================
# 7、使用if，编写程序，实现以下功能：
# •	从键盘获取用户名、密码
# •	如果用户名和密码都正确（预先设定一个用户名和密码），那么就显示“欢迎进入xxx的世界”，否则提示密码或者用户名错误
# 8、有能力的同学可以用循环的方式做出石头剪刀布的游戏并且输入中文

# a = input('请输入（0剪刀1石头2布）：\n')
# b = random.randint(0, 1)
# # if a != (0, 2):
# if a != '0' and a != '1' and a != '2':
#     print('输入错误')
# else:
#     a = int(a)
#     if (a == 0 and b == 2) or (a == 1 and b == 2) or (a == 2 and b == 0):
#         print('你出的%d\n电脑出%d\n你败' % (a, b))
#     elif a == b:
#         print('你出的%d\n电脑出%d\n平局' % (a, b))
#     else:
#         print('你出的%d\n电脑出%d\n你胜' % (a, b))
#
# i = 1
# while i < 10:
#     j = 1
#     while j < i:
#         print('%d * %d = %-3d ' % (j, i, i*j), end='')
#         j += 1
#     print()
#     i += 1
#
# g = 1
# while g <= 19:
#     h = 1
#     if g <= 10:
#         k = g
#     else:
#         k = 20 - g
#     while h <= k:
#         print('*', end='')
#         h += 1
#     print()
#     g += 1


# str = '1234567890'
# strkone = str[-3:-1]
# print(strkone)


#
# list_one = ['剪刀', '石头', '布']
# a = random.randint(0, 2)
# b = input('请输入你要出的（0：剪刀，1：石头，2：布）：\n')
# if b in ['0', '1', '2']:
#     b = int(b)
#     if (a == 0 and b == 1) or (a == 1 and b == 2) or (a == 2 and b == 0):
#         print('你出的 %s \n电脑出 %s \n你胜' % (list_one[b], list_one[a]))
#     elif a == b:
#         print('你出的 %s \n电脑出 %s \n平局' % (list_one[b], list_one[a]))
#     else:
#         print('你出的 %s \n电脑出 %s \n你败' % (list_one[b], list_one[a]))
# else:
#     print('您输入的有误，请重新输入！')
#
#
# # 一个学校，三个办公室，八个老师，随机分配办公室
# school = [[], [], []]
# teacher = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
# for i in teacher:
#     school[random.randint(0, 2)].append(i)
# print(school)

str_one = 'adsfghjkl'
print(str_one[::-1])
list_one = [1, 2.3, 23432, 'a', 'a', 'dsaf', 'sdagsdag']
for i in list_one:
    print(i)
j = 0
while j < len(list_one):
    print(list_one[j])
    j += 1
list_one.append('asdf')
print(list_one)
list_one.extend('asdf')
print(list_one)
list_one.insert(0, 'insert')
print(list_one)
list_one[0] = 'update'
print(list_one)
print(list_one.index('a', 1, 5))
print(list_one.count('a'))
print(list_one)
list_one.pop()
print(list_one)
list_one.remove('a')
print(list_one)
del list_one[0]
print(list_one)
list_two = [1, 2, 4, 3, 6, 5, 7, 8, 9]
print(list_two)
list_two.reverse()
print(list_two)
list_two.sort()
print(list_two)
list_two.sort(reverse=True)
print(list_two)
tuple_one = ('a', 'b', 'c', 'd')
print(tuple_one)
dict_one = {'name': 'asdf', 'age': 12, 'sex': '男'}
print(dict_one)
print(dict_one.get('name'))
print(dict_one['name'])
dict_one['name'] = 'fdsa'
print(dict_one['name'])
dict_one['id'] = '5432543254'
print(dict_one)
del(dict_one['id'])
print(dict_one)
# dict_one.clear()
# del dict_one
print(len(dict_one))
print(dict_one.keys())
print(dict_one.values())
print(dict_one.items())
for i in str_one:
    print(i)
for i in dict_one:
    print(i)
for key, value in dict_one.items():
    print(key)
    print(value)
set_two = {'a', 'sdaf', 1}
set_null = set()
set_one = set(list_one)
print(set_one)
set_one.add('aaaaa')
print(set_one)
set_one.update('jkl')
print(set_one)
set_one.remove('a')
print(set_one)
set_one.pop()
print(set_one)
print(set_one & set_two)
print(set_one | set_two)









